'use strict';

// module app
var arduinoApp = angular.module('arduinoApp', ['arduinoControllers', 'arduinoServices', 'arduinoDirectives']);

// Config
arduinoApp.config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/', {      
      controller: 'MenuCtrl',
      templateUrl: 'views/menu.html'
    });
    $routeProvider.when('/menu', {      
      controller: 'MenuCtrl',
      templateUrl: 'views/menu.html'
    });
    $routeProvider.when('/config', {      
      controller: 'ConfigCtrl',
      templateUrl: 'views/config.html'
    });
    $routeProvider.when('/pinwrite', {
      controller: 'PinWriteCtrl',
      templateUrl: 'views/pinwrite.html'      
    });
    $routeProvider.when('/pinread', {
      controller: 'PinReadCtrl',
      templateUrl: 'views/pinread.html'      
    });
    $routeProvider.when('/blink', {
      controller: 'BlinkCtrl',
      templateUrl: 'views/blink.html'    
    });
    $routeProvider.when('/command', {
      controller: 'CommandCtrl',
      templateUrl: 'views/command.html'      
    });
    $routeProvider.otherwise({
      redirectTo: '/menu'
    });
  }
]);